package pers.cz.node;

import org.openqa.selenium.remote.RemoteWebDriver;
import pers.cz.mxgraph.MxCell;

/**
 * @program: PostGirl-panent
 * @description: 结束节点，关闭浏览器等操作
 * @author: Cheng Zhi
 * @create: 2023-02-03 15:02
 **/
public class OverNode extends AbstractNode {

    public OverNode(MxCell mxCell) {
        super(mxCell);
    }

    @Override
    public void runNode(NodeCallBack callBack) throws Exception {

        RemoteWebDriver driver = getDriver();
        driver.close(); // 关闭页面
        driver.quit(); // 关闭浏览器
    }

    @Override
    public void verify() {

    }

    @Override
    public String getName() {
        return mxCell.getName();
    }
}
